<?php
if (empty($_GET['id'])) {
	$detail = array(
		'id' => '',
		'cid' => '',
		'cname' => '',
		'default_lang' => '',
		'theme' => '',
		'name' => '',
	);
	$moPos = 'siteAdd';
} else {
	$detail = Site::read($_GET['id']);
	$detail['lang'] = json_decode($detail['lang'], true);
	$detail['module_list'] = json_decode($detail['module_list'], true);
	$moPos = 'siteModify';
}

$categoryList = Site::getCategoryList();
$themList = C('themeList');
$moduleList = C('module');